package com.lz.autotest.project.testmanage.autoTest.service.thread;

import com.lz.autotest.project.testmanage.autoTest.entity.TsstAutotestMenu;
import com.lz.autotest.project.testmanage.autoTest.service.Listener.Listener;
import com.lz.autotest.project.testmanage.infmanage.domain.SstInf;

import java.util.List;

/**
 * @author: X
 * @date: Created in 2023/6/30 17:16
 * @Description: 线程内容
 */
public class ThreadContext {

    private String threadName;

    private List<SstInf> sstInfs;

    private List<List<String>> data;

    private List<Listener> listeners;

    private Integer cycleNumber;

    private Integer threadNumber;

    private String threadType;

    private TsstAutotestMenu tsstAutotestMenu;

    //构建器
    public static class Builder
    {
        private String threadName;

        private List<SstInf> sstInfs;

        private List<List<String>> data;

        private List<Listener> listeners;

        private Integer cycleNumber;

        private Integer threadNumber;

        private String threadType;

        private TsstAutotestMenu tsstAutotestMenu;

        public Builder() {
        }

        public Builder setThreadName(String threadName) {
            this.threadName = threadName;
            return this;
        }

        public Builder setSstInfs(List<SstInf> sstInfs) {
            this.sstInfs = sstInfs;
            return this;
        }

        public Builder setThreadNumber(Integer threadNumber) {
            this.threadNumber = threadNumber;
            return this;
        }

        public Builder setData(List<List<String>> data) {
            this.data = data;
            return this;
        }

        public Builder setListeners(List<Listener> listeners) {
            this.listeners = listeners;
            return this;
        }

        public Builder setCycleNumber(Integer cycleNumber) {
            this.cycleNumber = cycleNumber;
            return this;
        }

        public Builder setThreadType(String threadType) {
            this.threadType = threadType;
            return this;
        }

        public Builder setTsstAutotestMenu(TsstAutotestMenu tsstAutotestMenu) {
            this.tsstAutotestMenu = tsstAutotestMenu;
            return this;
        }

        public ThreadContext build() {
            return new ThreadContext(this);
        }
    }

    private ThreadContext(Builder builder) {
        this.threadName = builder.threadName;
        this.threadNumber = builder.threadNumber;
        this.tsstAutotestMenu = builder.tsstAutotestMenu;
        this.sstInfs = builder.sstInfs;
        this.data = builder.data;
        this.listeners = builder.listeners;
        this.cycleNumber = builder.cycleNumber;
        this.threadType = builder.threadType;
    }

    public String getThreadName() {
        return threadName;
    }

    public void setThreadName(String threadName) {
        this.threadName = threadName;
    }

    public List<SstInf> getSstInfs() {
        return sstInfs;
    }

    public void setSstInfs(List<SstInf> sstInfs) {
        this.sstInfs = sstInfs;
    }

    public List<List<String>> getData() {
        return data;
    }

    public void setData(List<List<String>> data) {
        this.data = data;
    }

    public List<Listener> getListeners() {
        return listeners;
    }

    public void setListeners(List<Listener> listeners) {
        this.listeners = listeners;
    }

    public String getThreadType() {
        return threadType;
    }

    public void setThreadType(String threadType) {
        this.threadType = threadType;
    }

    public Integer getCycleNumber() {
        return cycleNumber;
    }

    public void setCycleNumber(Integer cycleNumber) {
        this.cycleNumber = cycleNumber;
    }

    public Integer getThreadNumber() {
        return threadNumber;
    }

    public void setThreadNumber(Integer threadNumber) {
        this.threadNumber = threadNumber;
    }

    public TsstAutotestMenu getTsstAutotestMenu() {
        return tsstAutotestMenu;
    }

    public void setTsstAutotestMenu(TsstAutotestMenu tsstAutotestMenu) {
        this.tsstAutotestMenu = tsstAutotestMenu;
    }

}
